/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2022-10-05
 * Time:21:05
 */
public class Test {
    public static void main(String[] args) {
        try {
            System.out.println(10/0);
        }catch (ArithmeticException e){
            e.printStackTrace();
            System.out.println("算数异常");
        }catch (ArrayIndexOutOfBoundsException e){
            e.printStackTrace();
            System.out.println("数组越界异常");
        }catch (Exception e){
            //具有父子类的关系，把父类放到最后边，放到前边的话，后面的不会执行，也会报错
            e.printStackTrace();
            System.out.println("异常");
        }
    }
}
